gtkeventcontrollerscroll: Drop device type checks
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 28 Sep 2020 21:30:05 +0000 (23:30 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Mon, 28 Sep 2020 21:35:36 +0000 (23:35 +0200)
Kinetic scrolling (and begin/end tracking) broke with commit cab1dcb696
since the pointing device used on X11 does not get as much GdkInputSource
granularity as the source device used to have in GTK3.

Actually this is kinda pointless, devices incapable of smooth scroll
should send discrete events, without those devices in the picture, we
want kinetic scroll to apply on every other device capable of smooth
scroll, so just do that.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3210
gtk/gtkeventcontrollerscroll.c

index 46573ca7de4c44621c0d74943b0ff5eeaa403eec..8b67f4ca914a30e440d1d003874baf3eb5a1a627 100644 (file)
@@ -263,9 +263,7 @@ gtk_event_controller_scroll_handle_event (GtkEventController *controller,
 
       gdk_scroll_event_get_deltas (event, &dx, &dy);
 
-      if (!scroll->active &&
-          (input_source == GDK_SOURCE_TRACKPOINT ||
-           input_source == GDK_SOURCE_TOUCHPAD))
+      if (!scroll->active)
         {
           g_signal_emit (controller, signals[SCROLL_BEGIN], 0);
           scroll_history_reset (scroll);